This repository was archived by the owner on Dec 20, 2025. It is now read-only.
chore: Version Packages #68
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
[email protected]
Major Changes
#76
51828adThanks @typicalninja! - Replace Axios with native Fetch APIReplace Axios HTTP client with native fetch API to reduce external dependencies and improve compatibility across environments.
Breaking Change: The
requestConfigoption now accepts theRequestOptionsinterface (extendingRequestInit) instead ofAxiosRequestConfig.import { search } from "google-sr"; search({ requestConfig: { - params: { + queryParams: { safe: "active", gl: "us", }, headers: { "Some-Header": "value", }, }, })#79
ae54adfThanks @typicalninja! - Rename CurrencyResult to UnitConversionResultRename
CurrencyResulttoUnitConversionResultto better reflect its ability to handle all conversion queries (currency, units, measurements, etc.), not just currency conversions.Breaking Changes:
CurrencyResult→UnitConversionResultCurrencyResultNode→UnitConversionResultNodeResultTypes.CurrencyResult→ResultTypes.UnitConversionResult#80
592ea47Thanks @typicalninja! - Remove strictSelector in favor of noPartialResultsReplace
strictSelectoroption withnoPartialResultsfor improved clarity and better description of its behavior.search({ - strictSelector: true, + noPartialResults: true, });#92
2722f6dThanks @typicalninja! - Fixed types and improved all result parsersFixed generic types for partial results. Now
searchandsearchWithPagesreturn the correct types based on thenoPartialResultsoption.Breaking Changes:
DictionaryResultNodeinterface:phoneticandwordproperties are now required whennoPartialResultsistrue. This makes all result types consistent.DictionaryResultNodenow has the propertypeproperty.undefined(this was in the types but not working). This may break your code if you expected empty strings in the previous versions.Other Changes:
#93
4ac1402Thanks @typicalninja! - Make OrganicResult description field optionalThe
descriptionfield inOrganicResultNodeis now optional (string | undefined) to handle cases where search results don't include a description. This is a breaking change as existing code may need to be updated to handle the undefined case.#73
f462148Thanks @typicalninja! - Remove ResultNodeTyper type helperResultNodeTyperwas a helper type that was used to define the type returned by a parser. This was removed, as it can be replaced with a simple interface definition.#85
85bae81Thanks @typicalninja! - RenameResultSelectortoResultParserandresultTypestoparsersThe API has been updated to use more intuitive naming that eliminates confusion between CSS selectors and result parser functions.
Breaking Changes:
ResultSelectortype renamed toResultParserresultTypesoption renamed toparsersin search functionsMigration Guide:
import { search, OrganicResult } from "google-sr"; const results = await search({ query: "hello world", - resultTypes: [OrganicResult], + parsers: [OrganicResult], });Minor Changes
#71
cae9f30Thanks @tresorama! - Add NewsResult for parsing Google News tab resultsAdd
NewsResultparser for Google News tab search results. Requires settingtbm: 'nws'inrequestConfigand is incompatible with other parsers.#89
bb1cc1aThanks @typicalninja! - Add thumbnail image to news parser & selector#90
352ba4cThanks @typicalninja! - Add metadata properties to OrganicSearch parserThe parser now returns an
OrganicResultNodewith the following new properties:source: The source of the result, usually a human friendly version of the URL.isAd: boolean indicating if the result is an ad.export interface OrganicResultNode extends SearchResultNodeLike { type: typeof ResultTypes.OrganicResult; + source: string; + isAd: boolean; }#94
6c08082Thanks @typicalninja! - Migrate packages to ESM-first with CJS compatibility via dual buildAll packages have been migrated from CJS-first to ESM-first architecture. Existing users can continue using the packages without any code changes as both ESM and CJS builds are provided.
#96
51580a6Thanks @typicalninja! - Add RelatedSearchesResult parser for extracting related search queriesAdd
RelatedSearchesResultparser to extract the "Related searches" suggestions that Google displays at the bottom of search results to help users find similar queries.The parser returns a
RelatedSearchesResultNodewith:type:"RELATED_SEARCHES"queries: Array of related search query stringsPatch Changes
#98
33993c9Thanks @typicalninja! - Fix delay option in searchWithPages functionThe delay option was previously defined in
SearchOptionsWithPagesinterface but was not actually implemented in thesearchWithPagesfunction. This fix adds the missing delay functionality that applies the specified delay (default 1000ms) between page requests, helping to prevent rate limiting.#83
52d4ed8Thanks @typicalninja! - Optimize parser performance by checking for empty data earlier when noPartialResults is enabled#65
fe575b5Thanks @typicalninja! - Update dependencies to latest versionsUpdated dependencies [
352ba4c,cae9f30,bb1cc1a,786a8fc,51580a6,6c08082]:[email protected]
Major Changes
786a8fcThanks @typicalninja! - Rename CurrencyConvertSelector to UnitConversionSelectorRename
CurrencyConvertSelectortoUnitConversionSelectorto better reflect its ability to handle all conversion queries (currency, units, measurements, etc.), not just currency conversions.Breaking Changes:
CurrencyConvertSelector→UnitConversionSelectorMinor Changes
#90
352ba4cThanks @typicalninja! - Add metadata selectors to OrganicSearchSelectorThis release adds new CSS selectors for extracting metadata from Google search results:
The
metaSourceandmetaAdselectors are nested within themetaContainerelement.#71
cae9f30Thanks @tresorama! - Add NewsResult for parsing Google News tab resultsAdd
NewsResultparser for Google News tab search results. Requires settingtbm: 'nws'inrequestConfigand is incompatible with other parsers.#89
bb1cc1aThanks @typicalninja! - Add thumbnail image to news parser & selector#96
51580a6Thanks @typicalninja! - Add RelatedSearchesSelector for parsing related search queriesAdd new CSS selectors for extracting related search suggestions that appear at the bottom of Google search results.
#94
6c08082Thanks @typicalninja! - Migrate packages to ESM-first with CJS compatibility via dual buildAll packages have been migrated from CJS-first to ESM-first architecture. Existing users can continue using the packages without any code changes as both ESM and CJS builds are provided.
[email protected]
Major Changes
#85
85bae81Thanks @typicalninja! - Update CLI to use renamed parser APIThe CLI now uses the new
parsersoption andResultParsertype fromgoogle-srinstead of the oldresultTypesandResultSelectornames.Breaking Change:
--resultTypes/-ris now--parsers/-rto match the new API.Minor Changes
#79
ae54adfThanks @typicalninja! - Rename CurrencyResult to UnitConversionResultRename
CurrencyResulttoUnitConversionResultto better reflect its ability to handle all conversion queries (currency, units, measurements, etc.), not just currency conversions.Breaking Changes:
CurrencyResult→UnitConversionResultCurrencyResultNode→UnitConversionResultNodeResultTypes.CurrencyResult→ResultTypes.UnitConversionResult#94
6c08082Thanks @typicalninja! - Migrate packages to ESM-first with CJS compatibility via dual buildAll packages have been migrated from CJS-first to ESM-first architecture. Existing users can continue using the packages without any code changes as both ESM and CJS builds are provided.
Patch Changes
#65
fe575b5Thanks @typicalninja! - Update dependencies to latest versionsUpdated dependencies [
33993c9,51828ad,52d4ed8,ae54adf,cae9f30,bb1cc1a,352ba4c,592ea47,2722f6d,fe575b5,6c08082,4ac1402,51580a6,f462148,85bae81]: